package com.loser.module.id;

import io.github.loserya.module.idgen.hardcode.GEN;
import io.github.loserya.module.idgen.strategy.IdGenStrategy;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
public class MyIdGen implements IdGenStrategy {
    int i = 1;

    @Override
    public GEN getType() {
        return GEN.CUSTOM;
    }

    @Override
    public Serializable genId(Object o) {
        return String.valueOf(i++);
    }
}
